package net.dopan.pigframe.gateway.service;

import org.springframework.security.core.Authentication;

import javax.servlet.http.HttpServletRequest;

/**
 * @Package: net.dopan.pigframe.gateway.service
 * @Title: PermissionService
 * @Description: 用户请求权限判断
 * @author: 刘宽
 * @date: 2018/10/10 11:07
 */
public interface PermissionService {
    /**
     * 判断请求是否有权限
     *
     * @param request        HttpServletRequest
     * @param authentication 认证信息
     * @return 是否有权限
     */
    boolean hasPermission(HttpServletRequest request, Authentication authentication);
}
